<include file="Public/header" title="批量录入"/>

<link href="__STATIC__/fileinput/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
<script src="__STATIC__/js/jquery-1.10.2.js"></script>
<script src="__STATIC__/fileinput/js/fileinput.js" type="text/javascript"/>
<script src="__STATIC__/fileinput/js/fileinput_locales_zh.js"></script>
<div id="page-wrapper">

    <div class="col-md-2 col-md-offset-10">
        <a href="./Uploads/model/suspicious.xlsx" class="btn btn-file">录入模板下载</a>
    </div>

    <div class="row" style="margin-top:150px">

        <div class="col-md-6 col-md-offset-3">
            <form enctype="multipart/form-data">

                <label class="control-label" style="text-align: center">批量录入</label>
                <input id="uploadfile" class="file" type="file" multiple data-max-file-count="1">
            </form>

        </div>

    </div>


</div>

<script type="text/javascript">

    $("#uploadfile").fileinput({
        language: 'zh',
        uploadUrl: "{:U('Index/multiimport')}", //上传的地址
        allowedFileExtensions: ['xlsx', 'xls'],//接收的文件后缀
        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
        uploadAsync: true, //默认异步上传
        showUpload: true, //是否显示上传按钮
        showRemove: true, //显示移除按钮
        showPreview: true, //是否显示预览
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式
        dropZoneEnabled: true,//是否显示拖拽区域
        maxFileCount: 1, //表示允许同时上传的最大文件个数
        enctype: 'multipart/form-data',
        validateInitialCount: true,
        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
    });
</script>
<include file="Public/footer"/>